package com.cskaoyan.controller.wx;

import com.cskaoyan.bean.BaseRespVo;
import com.cskaoyan.bean.wxbean.OrderStatusBean;
import com.cskaoyan.mapper.wx.WxOrderMapper;
import com.cskaoyan.service.wx.WxOrderService;
import com.cskaoyan.service.wx.WxUserService;
import com.cskaoyan.shiro.MallToken;
import com.cskaoyan.utils.IdUtils;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.HashMap;

/**
 * Created by Enzo Cotter on 2020/10/7.
 */
@RestController
@RequestMapping("wx/user")
public class WxUserController {
    @Autowired
    WxUserService wxUserService;

    @RequestMapping("index")
    public BaseRespVo userIndex(){
        Integer id = IdUtils.getId();
        OrderStatusBean orderStatusBean = wxUserService.selectOrderStatus(id);
        HashMap<String, Object> map = new HashMap<>();
        map.put("order",orderStatusBean);
        return BaseRespVo.ok(map);
    }
}
